version=v0.101.1

# Exit if lbrynet already exists
ls flbry/lbrynet >/dev/null && exit 1

if [ "$(uname)" == "Darwin" ]; then
    wget -O /tmp/lbrynet.zip https://github.com/lbryio/lbry-sdk/releases/download/$version/lbrynet-mac.zip
elif [ "$(uname)" == "Linux" ]; then
    wget -O /tmp/lbrynet.zip https://github.com/lbryio/lbry-sdk/releases/download/$version/lbrynet-linux.zip
fi

unzip /tmp/lbrynet.zip -d flbry
rm /tmp/lbrynet.zip
